
{include file="public/meta" /}


</head>

<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>专业</h5>
                    <div class="ibox-tools">
                        <a class="link">
                            <b>
                                <i class="layui-icon layui-icon-refresh"></i>
                            </b>
                        </a>
                    </div>
                </div>
                <div class="ibox-content">
                    <div class="row">
                        <!--搜索框开始-->
                        <div class="col-sm-12">
                            <div class="layui-form layui-form-item">
                                <!--搜索框开始-->
                                <div class="col-sm-12">
                                    <div class="layui-form layui-form-item">
                                        <div class="layui-input-inline layui-form">
                                            <select name="status" lay-search="">
                                                <option value="">状态信息</option>
                                                <option value="1">正常</option>
                                                <option value="2">异常</option>
                                                <option value="3">永久封停</option>
                                            </select>
                                        </div>
                                        <div class="layui-input-inline">
                                            <button class="layui-btn" lay-submit="" lay-filter="LAY-search">立即搜索</button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <table id="demo" class="layui-hide" lay-filter="test"></table>
                    <script type="text/html" id="status">
                        {{#  if(d.status === 1){ }}
                            <button type="button" class="layui-btn layui-btn-xs layui-btn-normal">正常</button>
                        {{#  } }}
                        {{#  if(d.status === 2){ }}
                            <button type="button" class="layui-btn layui-btn-xs layui-btn-warm">异常</button>
                        {{#  } }}
                        {{#  if(d.status === 3){ }}
                            <button type="button" class="layui-btn layui-btn-xs layui-btn-danger">永久封停</button>
                        {{#  } }}
                    </script>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    layui.use('table', function(){
        var table = layui.table
            , form = layui.form;
        //第一个实例
        table.render({
            elem: '#demo'
            //,height: 312
            ,url: "{:url('admin/person/about_person')}" //数据接口
            ,page: true //开启分页
            ,response: {
                statusCode: 200 //成功的状态码，默认：0
            }
            , size: 'lg' //sm小尺寸的表格 lg大尺寸
            , cellMinWidth: 150
            , limits: [5, 10, 15, 20, 25, 30]
            , limit: "{:config('pages')}"
            , toolbar: '#toolbarDemo'
            , defaultToolbar: ['filter','exports'] //工具类
            , loading: true
            , id: 'test'
            ,cols: [[ //表头
                {field: 'id', title: 'ID', width:60, sort: true, fixed: 'left'}
                ,{field: 'status', title: '状态',templet:'#status'}
                ,{field: 'msg', title: '提示信息'}
                ,{field: 'login_ip', title: '登录IP'}
                ,{field: 'login_time', title: '登录时间'}
                ,{field: 'address', title: '地址'}
                ,{field: 'point', title: '经纬度'}
            ]]
        });
        //监听搜索
        form.on('submit(LAY-search)', function (data) {
            //执行重载
            table.reload('test', {
                page: {
                    curr: 1 //重新从第 1 页开始
                }
                ,where: data.field
            });
        });
    });
</script>
<!-- 全局js -->
{include file="public/footer" /}
</body>

</html>
